<template>
  <div class="products">
    <BsSubmenu :subMenus="subMenus" />
     <section class="banner">
      <div class="text-center f24">
        加盟合作
      </div>
    </section>
    <section class="news hd">
      <div class="section-title f24 mb40">加盟要求</div>
      <div>
        <img src="../assets/images/about/加盟1.png" width="400" alt="">
      </div>
    </section>
    
    <section class="section-2 text-center">
      <div class="section-title f24 mb40">代理商权利</div>

      <div>
        <img src="../assets/images/about/wx253424324.png" width="800" alt="">
      </div>
    </section>
    
    <section class="section-3 text-center">
      <div class="section-title f24 mb40">合作流程</div>
    
      <div>
        <img src="../assets/images/about/wx994324324.png" width="800" alt="">
      </div>
    </section>
    
    <section class="section-4 text-center">
      <div class="section-title f24 mb40">申请合作</div>
    

    </section>
  </div>

</template>

<script>
import BsSubmenu from '@/components/BsSubmenu'

export default {
  components: {BsSubmenu},
  data (){
    return {
      subMenus: [
        {title: '普通代理商', link:'/about/cooperation', active: true, type:'1'},
        {title: '区县代理商', link:'/about/cooperation?type=2', active: false, type:'2'},
        {title: '地市级代理商', link:'/about/cooperation?type=3', active: false, type:'3'},
        {title: '省级代理商', link:'/about/cooperation?type=4', active: false, type:'4'},
        {title: 'OEM合作', link:'/about/cooperation?type=5', active: false, type:'5'},
      ]
    }
  },
  beforeRouteUpdate (to, from, next){
    let type = to.query.type || '1'
    this.subMenus.forEach(v => {
      v.active = (type == v.type)
    })
    next()
  }
}
</script>

<style lang="less" scoped>
.banner{
  background: url(../assets/images/supports/bann.png) no-repeat center center;
  height: 210px;
  color: #fff;
  line-height: 210px;
}
.news{
  padding: 80px 0;
  text-align: center;
}

.section-2{
  padding: 80px 0;
  background: #eff0f1;
}

.section-3{
  padding: 80px 0;
  
}

.section-4{
  padding: 80px 0;
  background: #1b83e6;
  color: #fff;
}
</style>
